const express = require("express");
const users = express.Router();
const { query } = require("../../utils/mysql.js");
const User = require("./user");
// 获取用户列表
users.get("/getList", (req, res) => {
  User.getList(query, req, res);
});

// 添加用户接口
users.post("/addUser", (req, res) => {
  User.addUser(query, req, res);
});
// 修改用户接口
users.post("/updateUser", (req, res) => {
  User.updateUser(query, req, res);
});
// 删除用户接口
users.post("/deleteUser", (req, res) => {
  User.deleteUser(query, req, res);
});
module.exports = users;
